{extend name="layout/layout" /}

{block name="content"}
<blockquote class="layui-elem-quote quoteBox">
    <form class="layui-form">
        <div class="layui-inline searchBox">
            <div class="layui-input-inline">
                <input type="text" class="layui-input title" name="name" placeholder="优惠券名称" />
            </div>

            <div class="layui-input-inline">
                <input type="text" class="layui-input account_number" name="account_number" placeholder="会员卡号" />
            </div>

            <div class="layui-input-inline">
                <select  name="time" lay-verify="required" class="time">
                    <option value="0">所有状态</option>
                    <option value="1">未使用</option>
                    <option value="2">已使用</option>
                    <option value="3">已过期</option>
                </select>
            </div>
            <div class="layui-input-inline">
                <select  name="coupon_purpose" lay-verify="required" class="coupon_purpose">
                    <option value="0">全部领取方式</option>
                    {foreach $get_coupon_purpose as $k => $v}
                    <option value="{$k}">{$v}</option>
                    {/foreach}
                </select>
            </div>
            <a class="layui-btn search_btn" data-type="reload">搜索</a>
        </div>
        <!--<div class="layui-inline">
            <a class="layui-btn layui-btn-danger layui-btn-normal delAll_btn">批量删除</a>
        </div>-->

    </form>
</blockquote>

<table id="dataTable" lay-filter="dataTable"></table>

<!--操作-->
<script type="text/html" id="handleBar">
    <a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
    <a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="del">删除</a>
</script>

<input type="hidden" class="datalist_url" value="{:url('admin/'.strtolower($model).'/index')}">
<input type="hidden" class="add_url" value="{:url('admin/'.strtolower($model).'/add')}">
<input type="hidden" class="edit_url" value="{:url('admin/'.strtolower($model).'/edit')}">
<input type="hidden" class="delete_url" value="{:url('admin/'.strtolower($model).'/delete')}">
{/block}

{block name="pagescript"}
<script>
    var DELETE_URL = "{:url('admin/'.strtolower($model).'/delete')}";
</script>
<script src="__STATIC__/admin/pages/js/promotioncount.js" type="text/javascript"></script>
{/block}